import com.mosesSupposes.fuse.*;
class com.Lithyem.NSGS.Profiles.TranslucentBlocks extends MovieClip{
	
	var clip_0_mc:MovieClip;
	var clip_1_mc:MovieClip;
	var clip_2_mc:MovieClip;
	var thin_mc:MovieClip;
	
	function TranslucentBlocks(){
		_visible = false;
		
		
		thin_mc._alpha = 80;
	}
	
	function init(c:Number):Void{
		var c_obj = new Color(this);
		c_obj.setRGB(c);
		_visible = true;
		unshuffle();
	}
	
	function shuffle():Void{
		
		/*
		clip_0_mc._alpha = random(50)+20;
		clip_1_mc._alpha = random(50)+20;
		clip_2_mc._alpha = random(50)+20;
		
		clip_0_mc._width = random(50)+50;
		clip_1_mc._width = random(50)+50;
		clip_2_mc._width = random(50)+50;
		
		clip_0_mc._x = 100-clip_0_mc._width;
		clip_1_mc._x = 100-clip_1_mc._width;
		clip_2_mc._x = 100-clip_2_mc._width;
		*/
		//thin_mc._x = random(90);
		
		
		var f = new Fuse(
			[
				{target:clip_0_mc, x:random(80), alpha:random(50)+20, seconds:.4, ease:'easeInOutQuad'},
				{target:clip_1_mc, x:random(80), alpha:random(50)+20, seconds:.5, ease:'easeInOutQuad'},
				{target:clip_2_mc, x:random(80), alpha:random(50)+20, seconds:.6, ease:'easeInOutQuad'},
				{target:thin_mc, x:random(90), seconds:.6, ease:'easeInOutQuad'}
				
			],
			[
				{target:clip_0_mc, x:random(80), alpha:random(50)+20, seconds:.4, ease:'easeInOutQuad'},
				{target:clip_1_mc, x:random(80), alpha:random(50)+20, seconds:.5, ease:'easeInOutQuad'},
				{target:clip_2_mc, x:random(80), alpha:random(50)+20, seconds:.6, ease:'easeInOutQuad'},
				{target:thin_mc, x:random(90), seconds:.6, ease:'easeInOutQuad'}
				
			]
		);
		f.start();
		
		
	}
	
	function unshuffle():Void{
		//trace("unshuffle");
		/*
		thin_mc._x = 90;
		clip_0_mc._x = 100;
		clip_1_mc._x = 100
		clip_2_mc._x = 100
		clip_0_mc._alpha = 0;
		clip_1_mc._alpha = 0;
		clip_2_mc._alpha = 0;
		*/
		
		var f = new Fuse(
			[
				{target:clip_0_mc, x:100, alpha:0, seconds:.5, ease:'easeInOutQuad'},
				{target:clip_1_mc, x:100, alpha:0, seconds:.5, ease:'easeInOutQuad'},
				{target:clip_2_mc, x:100, alpha:0, seconds:.5, ease:'easeInOutQuad'},
				{target:thin_mc, x:90, seconds:.5, ease:'easeInOutQuad'}
				
			]
		);
		f.start();
		
	}
	
	function onMouseDown():Void{
		//unshuffle();
	}
}